<template>
	<view class="content_three" v-if="userInfo.provide_services">
		<view class="tgka_title">{{$t('通关口岸')}}</view>
		<view 
			class="addressItem">
			<view class="tgka_title_address" v-if="lang=='zh'">{{message.shortname}}-{{message.name}}</view>
			<view class="tgka_title_address" v-if="lang=='ru'">{{message.shortname_ru}}-{{message.name_ru}}</view>
			<view class="ka_server">
				<view class="ka_server_block" v-if="setServe(userInfo.provide_services,'报关')">
					<image style="width: 30rpx;height: 30rpx;" src="@/static/homePage/ax.png" mode=""></image>
				</view>
				<view class="ka_server_block" v-if="setServe(userInfo.provide_services,'清关')">
					<image style="width: 30rpx;height: 30rpx;" src="@/static/homePage/bx.png" mode=""></image>
				</view>
				<view class="ka_server_block" v-if="setServe(userInfo.provide_services,'转关')">
					<image style="width: 30rpx;height: 30rpx;" src="@/static/homePage/cx.png" mode=""></image>
				</view>
				<view class="ka_server_block" v-if="setServe(userInfo.provide_services,'运输')">
					<image style="width: 30rpx;height: 30rpx;" src="@/static/homePage/dx.png" mode=""></image>
				</view>
				<view class="ka_server_block" v-if="setServe(userInfo.provide_services,'仓储')">
					<image style="width: 30rpx;height: 30rpx;" src="@/static/homePage/ex.png" mode=""></image>
				</view>
				<view class="ka_server_block" v-if="setServe(userInfo.provide_services,'装卸')">
					<image style="width: 30rpx;height: 30rpx;" src="@/static/homePage/fx.png" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['message','lang','userInfo'],
		data() {
			return {
				list: [1],
				indexID: 0,
			}
		},
		methods: {
			setServe(str,value){
				if(str){
					const arr = str.split(",");
					const contains = arr.includes(value);
					return contains
				}else{
					return false
				}
				
			},
			handeleItem(index) {
				this.indexID = index
			}
		}
	}
</script>

<style scoped>
	.tgka_title_address {
		font-weight: 400;
		font-size: 24rpx;
		width: 565rpx;
		height: 61rpx;
		word-break: break-all;
		overflow: hidden;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.ka_server_block {
		width: 50rpx;
		height: 50rpx;
		background: #F7F8FB;
		border-radius: 25rpx 25rpx 25rpx 25rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-left: 25rpx;
	}

	.ka_server {
		width: 100%;
		display: flex;
		height: 52rpx;
		align-items: center;
		justify-content: flex-end;
	}

	.addressItem {
		width: 630rpx;
		height: 154rpx;
		background: #0BC471;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		padding: 24rpx 20rpx 14rpx 20rpx;
		color: #FFFFFF;
		margin-bottom: 12rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.addressItem_active {
		width: 630rpx;
		height: 154rpx;
		background: #F0F0F0;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		padding: 24rpx 20rpx 14rpx 20rpx;
		margin-bottom: 12rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.content_three {
		width: 690rpx;
		min-height: 206rpx;
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin-top: 12rpx;
		padding: 34rpx 30rpx 24rpx 30rpx;
	}

	.tgka_title {
		font-weight: 500;
		font-size: 30rpx;
		color: #3D3D3D;
		margin-bottom: 24rpx;
	}
</style>